/*
 * =====================================================================================
 *
 *       Filename:  features.h
 *
 *    Description:  Header file for all features
 *
 *        Version:  1.0
 *        Created:  06/07/12 14:01:08
 *       Revision:  none
 *       Compiler:  gcc
 *
 *         Author:  Moos Hueting (mh), mooshueting@gmail.com
 *   Organization:  
 *
 * =====================================================================================
 */
#ifndef _CHAR_FEATURES
#define _CHAR_FEATURES

#include <cv.h>

using namespace cv;

// Axis-aligned mean (char 0 for rows, char 1 for cols)
float axismean(Mat, char);

// Perimetric complexity
float complexity(Mat);

// Convexity
float convexity(Mat);

// Number of corners using hit-and-miss
float corners(Mat);

// Max number of segments per row, col
float diffsegs(Mat, char);

// Average segment thickness per row, col
float avgThickness(Mat, char);

// Number of endpoints
float endpoints(Mat);

// Number of holes (genus)
float holes(Mat);

// Ratio of sides of bounding box
float ratio(Mat);

// Density of on pixels
float density(Mat);

// Number of junctions in skeleton
float junctions(Mat);

// Variance of pixels
float variance(Mat, char);

// Number of connected components
float connectedComponents(Mat);

// Number of diagonal connections
float diagConnections(Mat);

// Number of holes of area 1
int holenoise(Mat);

// Returns isocontour character of matrix
Mat isocontour(Mat);

// Returns size of bin in orientation histogram
float gradOrientation(Mat, char);

// Returns measure of curvedness of character
float curvature(Mat);

// Returns height of character
float height(Mat);
//
// Returns width of character
float width(Mat);

#endif
